package com.flame.shapeville.component.task1.shape2D;

import javafx.scene.paint.Color;
import javafx.scene.shape.Ellipse;

/**
 * Represents an oval (ellipse) used in Task 1.
 * <p>
 * This class draws an ellipse with predefined aspect ratio.
 *
 * @author Flame Dev Team
 * @version 1.0
 * @since 2025-05-12
 */
public class JfOval extends JfShape2D {

    /**
     * Constructs a new oval with the specified size.
     *
     * @param size the bounding box size for the oval
     */
    public JfOval(double size) {
        this.size = size;
        this.shape = new Ellipse(size / 2, size / 2, size / 2, size / 2 / Math.sqrt(3));
        initBaseParams(Color.CYAN);
    }
}
